package com.shop.admin.vo;

import com.shop.admin.valid.AddGroup;
import com.shop.admin.valid.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

@Data
public class CategoryVo {

    @NotNull(message = "修改必须指定id",groups = {UpdateGroup.class})
    @Null(message = "新增不能指定id",groups = {AddGroup.class})
    private Long cateId;

    @NotBlank(message = "分类名必须提交",groups = {AddGroup.class,UpdateGroup.class})
    private String cateName;
}
